package com.jemmyee.pizza.service;

import java.io.Serializable;
import java.util.List;

import org.hibernate.criterion.DetachedCriteria;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.jemmyee.core.dao.Page;
import com.jemmyee.pizza.dao.IExcerptDao;
import com.jemmyee.pizza.entity.Excerpt;
import com.jemmyee.pizza.entity.ExcerptStatistic;

/**
 * @author qiuchao
 * 2010-12-21
 */
@Service("excerptService")
public class ExcerptServiceImpl implements IExcerptService {
	@Autowired
	private IExcerptDao excerptDao;
	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#delete(java.lang.Object)
	 */
	public void delete(Excerpt entity) {
		// TODO Auto-generated method stub

	}
	public ExcerptStatistic getExcerptStatisticByTerm(String sql){
		return excerptDao.getExcerptStatisticByTerm(sql);
	}
	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#deleteAll(java.util.List)
	 */
	public void deleteAll(List<Excerpt> list) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#deleteById(java.io.Serializable)
	 */
	public void deleteById(Serializable id) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findAll()
	 */
	public List<Excerpt> findAll() {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findByCriteria(org.hibernate.criterion.DetachedCriteria)
	 */
	public List<Excerpt> findByCriteria(DetachedCriteria criteria) {
		return excerptDao.findByCriteria(criteria);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findById(java.io.Serializable)
	 */
	public Excerpt findById(Serializable id) {
		// TODO Auto-generated method stub
		return excerptDao.findById(id);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findByProperty(java.lang.String, java.lang.Object)
	 */
	public List<Excerpt> findByProperty(String propertyName, Object value) {
		// TODO Auto-generated method stub
		return null;
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#findPageByCriteria(org.hibernate.criterion.DetachedCriteria, int, int)
	 */
	public Page findPageByCriteria(DetachedCriteria detachedCriteria,
			int pageSize, int startIndex,String order) {
		// TODO Auto-generated method stub
		return excerptDao.findPageByCriteria(detachedCriteria, pageSize, startIndex, order);
	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#save(java.lang.Object)
	 */
	public void save(Excerpt entity) {
		// TODO Auto-generated method stub

	}

	/* (non-Javadoc)
	 * @see com.jemmyee.core.service.IBaseService#update(java.lang.Object)
	 */
	public void update(Excerpt entity) {
		// TODO Auto-generated method stub
		excerptDao.update(entity);
	}

	public void saveOrUpdateAll(List<Excerpt> excerpts) {
		excerptDao.saveOrUpdateAll(excerpts) ;
	}

}
